home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib15.dsk
/
SHIFTING & REVERSING EXERCISE.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
640b
|
13 lines
5 REM REQUIRES BLOCK ROUTINES $911A AND TRUCK #144
10 HGR : CALL 37799: POKE 251,144
20 POKE 252,130: POKE 253,144: POKE 254,5: POKE 255,0: CALL 37679
30 CALL 37298: REM ADD EMPTY BYTE COLUMN/RIGHT
50 FOR X = 0 TO 33
60 FOR Y = 1 TO 7: CALL 37390: NEXT : REM SHIFT THROUGH 1 BYTE
70 CALL 37296: REM INCREMENT HR/HL
80 NEXT : CALL 37289: CALL 37606: CALL 37298: CALL 37281: REM REMOVE LEAD BYTE/REVERSE/RESTORE LEAD BYTE/REVERSE LEAD BYTE
100 FOR X = 0 TO 33
110 FOR Y = 1 TO 7: CALL 37301: NEXT : REM SHIFT THROUGH 1 BYTE/LEFT
120 CALL 37281: REM DECREMENT HR/HL
130 NEXT : CALL 37289: CALL 37606: CALL 37298
140 GOTO 50